# Author:sp
# CreaTime: $(DATE)
# FileName: $(NAME)
# Description: simple introdution of the code
lst=[{'rating':[9.7,2062397],'id':'1292052','type':['犯罪','剧情'],'title':'肖申克的救赎','actors':['蒂姆罗宾斯','摩根弗里曼']},
{'rating':[9.6,1528760],'id':'1291546','type':['犯罪','爱情','同性'],'title':'霸王别姬','actors':['张国荣','张丰毅','巩俐','葛优']},
{'rating':[9.5,1559181],'id':'1292720','type':['犯罪','爱情'],'title':'阿甘正传','actors':['汤姆汉克斯','罗宾怀特']}
]

name=input('请输入你要查询的演员：')
for item in lst:                #遍历列表，得到一个又一个字典
    #name = input('请输入你要查询的演员：')
    title_lst = item['title']
    actors_lst=item['actors']   #生成了三个演员列表
    for actor in actors_lst:
        if name in actor:
            print(name+'出演了'+item['title'])


    '''
    for movie in item:                    #遍历字典，得到是一个又一个键值
        actors=movie['actors']
    print(actors)
    
    if name in actors_lst:
      print(name+'出演了'+)
    '''
